---
title: PdfTrackingMetadata
summary: API reference for PdfTrackingMetadata.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-17
library: PdfAPI.Core
reference_type: package
---

# PdfTrackingMetadata

`PdfTrackingMetadata` encodes and decodes the file-name prefix convention that carries application code, conversion type, and imaging intent alongside a tracked document's file id. Its `Parse` method contains a capture-group naming defect that means round-tripped conversion type and imaging intent are never correctly recovered. ([BR-37](../../business-rules.md#br-37-tracking-metadata-parse-defect))

## Purpose
- Composes a file-name prefix encoding application code, conversion type, imaging intent, and file id, via [Create tracking metadata](../../operations/op-12-create-tracking-metadata.md).
- Decodes a file-name prefix back into structured metadata, via [Parse tracking metadata](../../operations/op-13-parse-tracking-metadata.md) — though this decoding is defective for conversion type and imaging intent. ([BR-37](../../business-rules.md#br-37-tracking-metadata-parse-defect))

## Context
- Namespace: `PdfAPI.Core`
- Assembly/package: `PdfAPI.Core`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| ApplicationCode | `string ApplicationCode { get; set; }` | The application code segment of the tracking prefix. ([BR-31](../../business-rules.md#br-31-tracking-metadata-defaults)) |
| FileId | `Guid FileId { get; set; }` | The tracked file's identity, embedded in the prefix. |
| ShouldBeImaged | `bool ShouldBeImaged { get; set; }` | Whether the file should be imaged; encoded as `I`/`E` in the prefix. ([BR-33](../../business-rules.md#br-33-tracking-prefix-imaging-character)) |
| ConversionType | `PdfConversionType ConversionType { get; set; }` | The conversion type; encoded as `A`/`M` in the prefix. ([BR-32](../../business-rules.md#br-32-tracking-prefix-conversion-type-character)) |
| FilePrefix | `string FilePrefix { get; set; }` | The composed file-name prefix string. ([BR-34](../../business-rules.md#br-34-tracking-prefix-format)) |
| Create(Guid, string, PdfConversionType, bool) | `static PdfTrackingMetadata Create(Guid fileId, string applicationCode = "AUTO", PdfConversionType conversionType = Convert, bool shouldBeImaged = false)` | Builds a new metadata instance and composes its `FilePrefix`. ([BR-31](../../business-rules.md#br-31-tracking-metadata-defaults), [BR-32](../../business-rules.md#br-32-tracking-prefix-conversion-type-character), [BR-33](../../business-rules.md#br-33-tracking-prefix-imaging-character), [BR-34](../../business-rules.md#br-34-tracking-prefix-format)) |
| Parse(string) | `static PdfTrackingMetadata Parse(string prefix)` | Decodes a tracking prefix into a metadata instance, or returns `null` when the prefix does not match. ([BR-35](../../business-rules.md#br-35-tracking-prefix-parsing), [BR-36](../../business-rules.md#br-36-non-matching-prefix-yields-no-metadata), [BR-37](../../business-rules.md#br-37-tracking-metadata-parse-defect)) |

## Behavioral notes
- `Parse` always yields `ShouldBeImaged = false` and `ConversionType = Convert` regardless of the actual prefix content, because the regex capture groups it reads (`importType`, `conversionType`) do not match the groups the pattern defines (`import`, `type`). This is a defect in live code, not an inference. ([BR-37](../../business-rules.md#br-37-tracking-metadata-parse-defect))

## Constraints and usage notes
- Do not rely on `Parse` to recover `ShouldBeImaged` or `ConversionType` from a prefix produced by `Create`; only `ApplicationCode` and `FileId` round-trip correctly. ([BR-37](../../business-rules.md#br-37-tracking-metadata-parse-defect))

## Related documentation
- [Index](../../index.md)
- [Overview](../../overview.md)
- [Architecture](../../architecture.md)
- [Dependencies](../../dependencies.md)
- [Operations and processes](../../operations-processes.md)
- [Business rules](../../business-rules.md)
- [Security and authorization](../../security-authorization.md)
- [API reference](../index.md)

## Sources
- `PdfAPI.Core\PdfTrackingMetadata.cs`
